package bcc.java8.example05;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import joptsimple.internal.Strings;

/**
 * .
 *
 * @author: bcc
 * 2020/10/29
 */
public class StreamTest {
    public static void main(String[] args) {
        List<String> strings = Arrays.asList("abc", "", "bc", "efg", "abcd","", "jkl",null);
        List<String> filtered = strings.stream().
                filter(string -> !Strings.isNullOrEmpty(string)).
                collect(Collectors.toList());
        System.out.println(filtered);
    }
}
